package com.action.mvc.sm.service;

import com.github.pagehelper.PageHelper;
import com.action.mvc.sm.mapper.UserMvcMapper;
import com.action.mvc.sm.pojo.UserMvc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Wuxiang on 2017/3/8.
 */
@Service
public class UserServiceImpl implements UserService {

    //User接口
    @Autowired
    UserMvcMapper userMvcMapper;

    public List<UserMvc> findAll() {
        PageHelper.startPage(2, 5); // 核心分页代码
        return userMvcMapper.findAll();
    }
}
